package Obiect;

public class ObjectDemo {
    public static void main(String[] args) {
        String s1=new String("Hello");
        String S2=new String("Hello");
        //String重写了equals（）来比较字符串内容是否相等
        System.out.println(s1.equals(S2));

        StringBuilder S3=new StringBuilder("ASD");
        StringBuilder S4=new StringBuilder("ASD");
        //String没有重写equals()，以此调用的还是Object类的地址
        System.out.println(S3.equals(S4));
























//        Point P=new Point(100,200);
//        System.out.println(P);
//        System.out.println(P.toString());

    }
}
